1. Field of the Invention
The present invention relates to a control method for controlling execution of processing in a video game in which a game is made to progress with display of an image timed to a reference signal supplied every unit cycle, a storage medium storing a processing execution control program, and a game apparatus.
2. Related Background Art
In the game apparatus for making a game progress with display of an image, as illustrated in FIG. 13, it is common practice to define a unit time as a duration from Vsync (vertical synchronous signal) to next Vsync and execute a predetermined process within this unit time. This unit time corresponds to a time for one frame of screen. Unless the process for one frame has been completed within the unit time, motion of characters and the other objects displayed on the screen loses smoothness and appears jerky. It is thus indispensable to note that the process for one frame is always completed within the unit time, on the occasion of programming the game. For this reason, the game is programmed so that the process for one frame (main process 100 in FIG. 13) is completed with some margin (free time 101 in FIG. 13). This allows a moving picture to be always displayed smoothly.
When the program is structured so as to complete the process for one frame with some margin in order to display the image with motion smoothly, the free time 101, however, inevitably appears between the completion of the process for one frame and next Vsync. This free time 101 is a time in which a CPU stands by without carrying out any processing, which means that the processing performance of CPU is not utilized effectively during this period.
In other words, the completion of the main process 100 with the margin allows the smooth display of the image with motion on one hand, but it does not always assure the effective utilization of processing performance of CPU because of the free time 101 appearing inevitably, on the other hand.
An object of the present invention is to provide a control method for controlling execution of processing in a video game, a storage medium storing a processing execution control program, and a game apparatus. The control method of the invention assures the effective utilization of processing performance of CPU while allowing the smooth display of image with motion.
One aspect of the invention provides a method for controlling execution of processing in a video game, the game being made to progress with display of an image timed to a reference signal supplied every unit cycle, the method comprising, executing real time processing accompanied by a display routine containing a dynamic element to be completed within a time of the unit cycle with input of a reference signal, outputting a non real time processing request when a non real time processing accompanied by a thinking routine executable without being limited by the unit cycle is called by said real time processing, switching a processing object to said non real time processing after said real time processing for the unit cycle has been completed, executing said non real time processing; when a subsequent reference signal is input after the processing object has been switched to said non real time processing, switching the processing object to said real time processing while interrupting said non real time processing, and resume in response in a subsequent unit cycle said non real time processing which has been interrupted.
As a consequence, the real time processing is carried out with input of the reference signal supplied every unit cycle, and the non real time processing request is outputted when the need for the non real time processing arises during the real time processing. After completion of the real time processing, the non real time processing is then started to carry out the processing according to the non real time processing request outputted in the real time processing execution step. When the reference signal is supplied during the non real time processing, the real time processing is started again.
Therefore, the real time processing has been completed in the time of the unit cycle with reliability, and the non real time processing is carried out during the free time. Since the real time processing is the processing accompanied by the display routine containing the dynamic element, certain smoothness of motion of the displayed image is assured, because the processing accompanied by the display routine is carried out with reliability. The execution of the non real time processing in the free time assures the effective utilization of the processing performance of CPU.
In addition, since the non real time processing is the processing accompanied by the thinking routine, the certain smoothness of motion of the displayed image is assured, while a sufficient time is guaranteed for the processing concerning thinking in a simulation game.
In the above invention, the method may comprise queuing said non real time processing request in order in a queue buffer, and executing said non real time process in order in said queue buffer.
Further in the above invention, the method may comprise queuing a new non real time processing request in the queue buffer when said non real time processing calls a new non real time process.
Therefore, the processes according to the non real time processing requests, queued not only in the real time processing execution step but also in the non real time processing execution step, are carried out as the non real time processing during the free times as described above, whereby the processing performance of CPU is utilized more effectively.
Further it is one aspect of the present invention to provide a computer-readable storage medium storing a processing execution control program by which a game is made to progress with display of an image timed to a reference signal supplied every unit cycle, said processing execution control program causing a computer to execute a process comprising, executing real time processing accompanied by a display routine containing a dynamic element to be completed within a time of the unit cycle with input of a reference signal, outputting a non real time processing request when a non real time processing accompanied by a thinking routine executable without being limited by the unit cycle is called by said real time processing, switching a processing object to said non real time processing after said real time processing for the unit cycle has been completed, executing said non real time processing, when a subsequent reference signal is input after the processing object has been switched to said non real time processing, switching the processing object to said real time processing while interrupting said non real time processing, and resume in response in a subsequent unit cycle said non real time processing which has been interrupted.
According to the invention a game apparatus may be implemented by making a computer read in the program stored in the storage medium. Therefore, such storage media allow the program to be distributed and sold readily as software products independent of the apparatus. When this software is used by use of such hardware as general purpose computers or general purpose game apparatus, the game technology of the present invention can be carried out readily by these hardware.
It is more further aspect of the present invention to provide a game apparatus for making a game progress with display of an image timed to a reference signal supplied every unit cycle, said game apparatus comprising, a real time processing execution unit for executing real time processing accompanied by a display routine containing a dynamic element to be completed within a time of said unit cycle with input of said reference signal, and outputting a non real time processing request when a non real time processing accompanied by a sub routine executable without being limited by said unit cycle, is called by said real time processing, a non real time processing execution unit for executing said non real time processing and assuring that the processing is completed even with interruption, and a processing switch controller for starting the non real time processing execution unit after said real time processing execution unit has been completed, and for starting said real time processing execution unit while interrupting said non real time processing execution unit, with input of said reference signal.
It is still further aspect of the present invention to provide a computer data signal embodied in a transmission medium, said computer data signal containing a processing execution control program by which a game is made to progress with display of an image timed to reference signal supplied ever unit cycle, wherein said program causes a computer to perform a process comprising, executing real time processing accompanied by a display-routine containing a dynamic element to be completed within a time of the unit cycle with input of a reference signal, outputting a non real time processing request when a non real time processing accompanied by a thinking routine executable without being limited by the unit cycle is called by said real time processing, switching a processing object to said non real time processing after said real time processing for the unit cycle has been completed, executing said non real time processing; when a subsequent reference signal is input after the processing object has been switched to said non real time processing, switching the processing object to said real time processing while interrupting said non real time processing, and resume in response in a subsequent unit cycle said non real time processing which has been interrupted.
The present invention will be more fully understood from the detailed description given hereinbelow and the accompanying drawings, which are given by way of illustration only and are not to be considered as limiting the present invention.
Further scope of applicability of the present invention will become apparent from the detailed description given hereinafter. However, it should be understood that the detailed description and specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only, since various changes and modifications within the spirit and scope of the invention will be apparent to those skilled in the art from this detailed description.